package com.tomcov.shared;

import java.io.Serializable;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@PersistenceCapable
public class UserInfo implements Serializable{
	
	
	private static final long serialVersionUID = 1L;
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
	private String id;
	
	@Persistent public String userName;
	@Persistent public String emailAddress;
	@Persistent public String LastName;
	@Persistent public String FirstName;
	@Persistent public String password;
	@Persistent private boolean loggedIn = false;
	
	@Persistent public String phone;
	@Persistent public String langage;
	@Persistent public String model;
	@Persistent public String mark;
	@Persistent public String cons;
	@Persistent public String age;
	@Persistent public int place;
	
	
	
	public UserInfo() {
	}
	
	public UserInfo(String login, String emailAddress,String password,String FirstName,String LastName) {
		this.LastName=LastName;
		this.FirstName=FirstName;
		this.userName = login;
		this.setPassword(password);
		this.emailAddress = emailAddress;
		place=1;
		langage="English";
	}
	
	public boolean getLoggedIn() {
		return loggedIn;
	}
	public void setLoggedIn(boolean b) {
		loggedIn=b;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getEmailAddress() {
		return emailAddress;
	}
	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getFirstName() {
		return FirstName;
	}
	public void setFirstName(String userName) {
		this.FirstName = userName;
	}
	public String getLastName() {
		return LastName;
	}
	public void setLastName(String userName) {
		this.LastName = userName;
	}
	public String getId(){
		return id;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getLangage() {
		return langage;
	}

	public void setLangage(String langage) {
		this.langage = langage;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getMark() {
		return mark;
	}

	public void setMark(String mark) {
		this.mark = mark;
	}

	public String getCons() {
		return cons;
	}

	public void setCons(String cons) {
		this.cons = cons;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	public int getPlace() {
		return place;
	}

	public void setPlace(int place) {
		this.place = place;
	}
}
